import 'package:dk_flutter_base/dk_ui.dart';

class CellWidget extends StatelessWidget {
  final String title;
  final String leftName;
  final String rightName;
  final VoidCallback tapAction;
  CellWidget({
    this.title = "",
    this.leftName = "",
    this.rightName = "",
    this.tapAction
});
  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: this.tapAction,
      child: Container(
        margin: EdgeInsets.only(bottom: 10),
        color: Colors.white,
        child: Container(
          margin: EdgeInsets.only(left: 16,right: 16),
          padding: EdgeInsets.only(bottom: 18),
          //height: 75,
          color: Colors.white,
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: <Widget>[
              Padding(
                padding: const EdgeInsets.only(top: 15,bottom: 4),
                child: Text(this.title,style: TextStyle(color: Color(0xFF333333),fontSize: 14,),),
              ),
              Row(
                children: <Widget>[
                  Expanded(flex:3,child: Text(this.leftName,style: TextStyle(color: Color(0xFF666666),fontSize: 12),)),
                  Expanded(flex:2,child: Text(this.rightName,style: TextStyle(color: Color(0xFF666666),fontSize: 12),),),
                ],
              )
            ],
          ),
        ),
      ),
    );
  }
}
